package com.isunland.managesystem.ui;

import android.support.v4.app.Fragment;
import com.isunland.managesystem.R;
import com.isunland.managesystem.base.BaseFragment;
import com.isunland.managesystem.entity.BaseParams;
import com.isunland.managesystem.entity.RInappMain;

/**
 * 对象功能:  零购入库pager
 * 开发公司: 北京信普达系统工程有限公司
 * 开发人员: HuXiaoDan
 * 创建时间: 2017/7/18 14:33
 */
public class RetailInDetailActivity extends TableHeaderPagerActivity
    implements RetailInDetailFragment.CallBack {

  @Override protected Fragment createFragmentOne() {
    mBaseParams = (BaseParams) getIntent().getSerializableExtra(BaseFragment.EXTRA_PARAMS);
    return RetailInDetailFragment.newInstance(mBaseParams, new RetailInDetailFragment());
  }

  @Override protected Fragment createFragmentTwo() {
    mBaseParams = (BaseParams) getIntent().getSerializableExtra(BaseFragment.EXTRA_PARAMS);
    return RetailInMateriaListFragment.newInstance(mBaseParams, new RetailInMateriaListFragment());
  }

  @Override protected int[] createTitle() {
    return new int[] { R.string.retailIn, R.string.inMaterialList };
  }

  @Override public void onRefresh(RInappMain content, int type) {
    setNavigateTo(1);
    //更新content
    RetailInMateriaListFragment.getContent(content, type);
  }

  @Override public int getHeaderPosition() {
    return 1;
  }
}
